package com.example.Interface;

public class Test6Interface {
    /*  接口和接口的关系
    		继承关系，可以单继承，也可以多继承
     */

    public static void main(String[] args) {
        InterImpl1 ii = new InterImpl1();
        ii.method();
    }
}

interface Interface1 {
    public abstract void show1();

    public default void method() {
        System.out.println("Interface1... method");
    }
}

interface Interface2 {
    public abstract void show2();

    public default void method() {
        System.out.println("Interface2. method");
    }
}

interface Interface3 extends Interface1, Interface2 {

    @Override
    public default void method() {
        System.out.println("Interface3接口解决代码冲突问题，重写method方法");
    }
}

//实现类
class InterImpl1 implements Interface3 {

    @Override
    public void show1() {

    }

    @Override
    public void show2() {

    }
}